-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed the user management page cypress issue #9384
Conversation
WalkthroughThe changes in this pull request enhance the Cypress end-to-end test suite for user management. A new test case verifies the reflection of working hours in user profiles, including navigation to the profile after submitting hours. Additionally, a scenario for linking and unlinking facilities for multiple users is introduced, ensuring correct visibility in user cards. The Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Deploying care-fe with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
cypress/pageobject/Users/ManageUserPage.ts (1)
196-198
: Consider consolidating working hours verification methodsWhile the implementation using
cy.verifyContentPresence
is good, having two similar methods (verifyWorkingHours
andverifyProfileWorkingHours
) with different implementations could lead to maintenance issues.Consider consolidating both methods to use the same verification approach:
verifyWorkingHours(expectedHours: string) { cy.verifyContentPresence("#view-average_weekly_working_hours", [ expectedHours, ] as string[]); } - verifyProfileWorkingHours(expectedHours: string) { - cy.get("#view-average_weekly_working_hours").should( - "contain.text", - expectedHours, - ); - } + verifyProfileWorkingHours(expectedHours: string) { + this.verifyWorkingHours(expectedHours); + }cypress/e2e/users_spec/UsersManage.cy.ts (1)
308-308
: Enhance test coverage for working hours verificationWhile verifying working hours across different views is good, consider adding negative test cases to ensure robust validation.
Add test cases for:
- Non-numeric values
- Negative values
- Empty values
- Decimal values
Example:
// Add these test cases before setting the valid working hours const invalidInputs = ['abc', '-1', '', '23.5']; for (const input of invalidInputs) { manageUserPage.clearProfessionalInfo(); manageUserPage.typeInWeeklyWorkingHours(input); manageUserPage.clickSubmit(); manageUserPage.verifyErrorText("Average weekly working hours must be a number between 0 and 168"); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
cypress/e2e/users_spec/UsersManage.cy.ts
(1 hunks)cypress/pageobject/Users/ManageUserPage.ts
(1 hunks)
CARE Run #4010
Run Properties:
|
Project |
CARE
|
Branch Review |
flaky-test
|
Run status |
Passed #4010
|
Run duration | 05m 26s |
Commit |
1160d6e543: Fixed the user management page cypress issue
|
Committer | Mohammed Nihal |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
153
|
View all changes introduced in this branch ↗︎ |
@nihal467 Your efforts have helped advance digital healthcare and TeleICU systems. 🚀 Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! 🙌 |
Proposed Changes
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit
New Features
Bug Fixes
Refactor